package com.siderakis.gwt.request;

import org.springframework.roo.addon.gwt.RooGwtMirroredFrom;
import com.siderakis.Note;
import com.google.gwt.requestfactory.shared.ServerType;
import com.google.gwt.requestfactory.shared.RecordListRequest;
import com.google.gwt.requestfactory.shared.ServerOperation;
import com.google.gwt.requestfactory.shared.RecordRequest;
import com.google.gwt.valuestore.shared.PropertyReference;
import com.google.gwt.requestfactory.shared.RequestFactory.RequestObject;

@RooGwtMirroredFrom(Note.class)
@ServerType(type = Note.class)
public interface NoteRequest {

    @ServerOperation("FIND_ALL_NOTES")
    abstract RecordListRequest<com.siderakis.gwt.request.NoteRecord> findAllNotes();

    @ServerOperation("FIND_NOTE")
    abstract RecordRequest<com.siderakis.gwt.request.NoteRecord> findNote(PropertyReference<String> id);

    @ServerOperation("COUNT_NOTES")
    abstract RequestObject<java.lang.Long> countNotes();

    @ServerOperation("FIND_NOTE_ENTRIES")
    abstract RecordListRequest<com.siderakis.gwt.request.NoteRecord> findNoteEntries(int firstResult, int maxResults);
}
